package com.gitee.feizns.web.boot.ex;

import com.gitee.feizns.web.domain.result.Err;
import com.gitee.feizns.web.ex.CustomizeExceptionHandler;

import java.util.Map;

/**
 * @author feizns
 * @since 2019/8/4 0004
 */
public interface GlobalExceptionConfigurer {

    /**
     * 错误码映射规则
     * @param map
     */
    default void registryErrorMapping(Map<Class<? extends Throwable>, Err> map) { }

    /**
     * 错误码映射规则
     * @param map
     */
    default void extendsErrorHandlerMapping(Map<Class<?>, Class<? extends CustomizeExceptionHandler>> map) { }

}

